package com.qzy.demo.mapper;

import com.qzy.demo.pojo.URolePojo;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface URoleMapper {
    @Select("SELECT role.id,role.name from u_user_role urole left join u_role role on urole.rid = role.id where urole.uid = #{uid}")
    @Results({
            @Result(property = "id",  column = "id"),
            @Result(property = "name",  column = "name"),
    })
    List<URolePojo> findRoleByUid(Long uid);
}
